import type { RawNode } from '../../types/index.js';

export interface AccessibilitySupportedDatas {
  accessibility_data: AccessibilityData;
}

export interface AccessibilityId {
  accessibility_id_type?:
    | 'UNKNOWN'
    | 'MENU_ADD_TO_WATCH_LATER'
    | 'MENU_REMOVE_FROM_WATCH_LATER'
    | 'MENU_ADD_TO_PLAYLIST'
    | 'MENU_REMOVE_FROM_PLAYLIST'
    | 'MENU_SHARE_VIDEO'
    | 'MENU_SHARE_PLAYLIST'
    | 'MENU_OFFLINE_VIDEO'
    | 'MENU_OFFLINE_PLAYLIST'
    | 'MENU_DELETE_VIDEO'
    | 'MENU_DELETE_PLAYLIST'
    | 'MENU_EDIT_VIDEO_METADATA'
    | 'MENU_HIDE'
    | 'MENU_REMOVE_FROM_HISTORY'
    | 'MENU_LIKE'
    | 'MENU_INFO'
    | 'MENU_ADD_TO_REMOTE_QUEUE'
    | 'MENU_REMOVE_FROM_REMOTE_QUEUE'
    | 'MENU_CREATE_PLAYLIST'
    | 'MENU_SETTINGS'
    | 'MENU_PRIVACY'
    | 'MENU_FEEDBACK'
    | 'MENU_HELP'
    | 'MENU_DELETE_CHANNEL_POST'
    | 'MENU_PLAYLIST_JOIN_COLLABORATION'
    | 'MENU_EDIT_PLAYLIST'
    | 'MENU_OFFLINE_REMOVE'
    | 'MENU_OFFLINE_PAUSE'
    | 'MENU_OFFLINE_RESUME'
    | 'MENU_UNSUBSCRIBE'
    | 'MENU_GET_ALL_UPDATES'
    | 'MENU_DISMISS'
    | 'MENU_CANCEL_UPLOAD'
    | 'MENU_TAKE_PHOTO'
    | 'MENU_CHOOSE_PHOTO'
    | 'MENU_CHOOSE_FROM_CHANNEL_ART_GALLERY'
    | 'MENU_FILTER_VIDEOS_ONLY'
    | 'MENU_FILTER_VIDEOS_AND_POSTS'
    | 'MENU_WATCH_ON_TV'
    | 'MENU_INSERT_IN_REMOTE_QUEUE'
    | 'MENU_ADD_UPCOMING_EVENT_REMINDER'
    | 'MENU_REMOVE_UPCOMING_EVENT_REMINDER'
    | 'MENU_TOGGLE_DENSITY_MODE'
    | 'MENU_OFFLINE_UPSELL'
    | 'MENU_MORE_LIKE_THIS'
    | 'MENU_CREATE_VIDEO'
    | 'MENU_CREATE_LIVE_STREAM'
    | 'MENU_CREATE_REEL_ITEM'
    | 'MENU_CREATE_POST'
    | 'MENU_LESS_LIKE_THIS'
    | 'MENU_REEL_OVERFLOW'
    | 'MENU_DELETE_REEL'
    | 'MENU_EDIT_REEL'
    | 'MENU_REMOVE_FROM_QUEUE'
    | 'MENU_REEL_SHELF_OVERFLOW'
    | 'MENU_REEL_SHELF_DISMISS'
    | 'MENU_SHARE_ARTIST'
    | 'MENU_ABOUT_RECOMMENDATION'
    | 'MENU_REPORT'
    | 'EXPLORE_DESTINATION_TRENDING'
    | 'EXPLORE_DESTINATION_MUSIC'
    | 'EXPLORE_DESTINATION_GAMING'
    | 'EXPLORE_DESTINATION_NEWS'
    | 'EXPLORE_DESTINATION_MOVIES'
    | 'EXPLORE_DESTINATION_FASHION'
    | 'EXPLORE_DESTINATION_LEARNING'
    | 'EXPLORE_DESTINATION_STAY_HOME'
    | 'MENU_ABOUT_GAMING_RECOMMENDATAION'
    | 'EXPLORE_DESTINATION_LIVE'
    | 'MENU_QUALITY'
    | 'MENU_CAPTIONS'
    | 'MENU_PLAYBACK_SPEED'
    | 'MENU_SHARE_PLAYLIST_UNAVAILABLE'
    | 'MENU_INFO_CARD'
    | 'EXPLORE_DESTINATION_SPORTS'
    | 'MENU_SINGLE_LOOP'
    | 'MENU_HIDE_VIDEO'
    | 'MENU_CLEAR_QUEUE'
    | 'EXPLORE_DESTINATION_SHOPPING'
    | 'MENU_PLAY_NEXT_IN_QUEUE'
    | 'MENU_PLAY_LAST_IN_QUEUE'
    | 'MENU_GO_TO_CHANNEL'
    | 'EXPLORE_DESTINATION_PODCASTS'
    | 'MEDIA_GENERATOR_PROMPT_INPUT'
    | 'MEDIA_GENERATOR_STYLE_SHELF'
    | 'MEDIA_GENERATOR_STYLE_ITEM'
    | 'MEDIA_GENERATOR_CREATE_BUTTON'
    | 'MEDIA_GENERATOR_T2V_ENTRYPOINT'
    | 'MEDIA_GENERATOR_T2I_ENTRYPOINT'
    | 'MEDIA_GENERATOR_T2M_ENTRYPOINT'
    | 'MEDIA_GENERATOR_BACK_BUTTON'
    | 'MEDIA_GENERATOR_HEADER'
    | 'MEDIA_GENERATOR_LOADING_PROGRESS'
    | 'MEDIA_GENERATOR_CANCEL_BUTTON'
    | 'MEDIA_GENERATOR_IMAGE_PREVIEW'
    | 'MEDIA_GENERATOR_VIDEO_PREVIEW'
    | 'MEDIA_GENERATOR_DONE_BUTTON'
    | 'MEDIA_GENERATOR_IMAGE_SELECTION'
    | 'MEDIA_GENERATOR_SOUND_METADATA'
    | 'MEDIA_GENERATOR_AUDIO_SELECT_BUTTON'
    | 'MEDIA_GENERATOR_T2I2V_ENTRYPOINT'
    | 'MENU_SAVE_QUEUE_TO_PLAYLIST'
    | 'MEDIA_GENERATOR_ANIMATE_BUTTON'
    | 'MEDIA_GENERATOR_SEGMENT_IMPORT_ENTRYPOINT';
}

export default class AccessibilityData {
  public accessibility_identifier?: string;
  public identifier?: AccessibilityId;
  public label?: string;
  
  constructor(data: RawNode) {
    if ('accessibilityIdentifier' in data) {
      this.accessibility_identifier = data.accessibilityIdentifier;
    }
    
    if ('identifier' in data) {
      this.identifier = {
        accessibility_id_type: data.identifier.accessibilityIdType
      };
    }
    
    if ('label' in data) {
      this.label = data.label;
    }
  }
}